using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Baula.TextGen.ActiveTemplating.Tests
{
    [TestClass]
    public abstract class TestBase
    {
        [TestInitialize]
        public void TestInitialize()
        {
            try
            {
                Setup();
                BecauseOf();
            }
            catch (Exception xcp)
            {
                ExceptionThrown = xcp;
            }
        }

        protected Exception ExceptionThrown { get; private set; }

        protected abstract void BecauseOf();

        protected virtual void Setup()
        { }
    }
}